package chapter01;import java.util.Arrays;public class Interface_01 {    public static void main(String[] args) {        Student[] ss = new Student[3];        ss[0] = new Student(15);        ss[1] = new Student(25);        ss[2] = new Student(5);        Arrays.sort(ss);        for(Student s : ss)        {            System.out.printf(s.age +  ",");        }    }}class Student implements Comparable<Student>{    public int age;    public  Student() { }    public Student(int age) {        this.age = age;    }    public int getAge() {        return age;    }    public void setAge(int age) {        this.age = age;    }    @Override    public int compareTo(Student o) {        if(this.age > o.age) return 1;        else if(this.age == o.age) return 0;        return -1;    }}